﻿using System;
using System.ComponentModel.DataAnnotations;

namespace Icms.Core.Model
{
    public class Message : Entity
    {
        public bool IsRead { get; set; }
        public bool IsRecipientNotified { get; set; }
        public Guid RecipientId { get; set; }
        public virtual User Recipient { get; set; }
        public string Subject { get; set; }
        public string Text { get; set; }
        public DateTime DateSent { get; set; }

    }

    public class BackupLog
    {
        public DateTime Date { get; set; }
        public Guid CourtId { get; set; }
        
        [NotMapped]
        public virtual Court Court { get; set; }
    }

    public class ReportTemplate : Entity
    {
        public string Name { get; set; }
        public string Title { get; set; }
        public long? GroupId { get; set; }
        public virtual ReportTemplateGroup Group { get; set; }
    }

    public class ReportTemplateGroup
    {
        public long Id { get; set; }
        public string Name { get; set; }
    }

    public class ReportRequest : Entity
    {
        public DateTime Date { get; set; }
        public string FileName { get; set; }
        public Guid? ReportTemplateId { get; set; }
        public virtual ReportTemplate ReportTemplate { get; set; }
        public Guid UserId { get; set; }
        public virtual User User { get; set; }
        public DateTime DateTo { get; set; }
        public DateTime DateFrom { get; set; }
        public Guid? CourtId { get; set; }
    }

    public class Entity
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public Guid Id { get; set; }
    }

    public class DelEntity : Entity, IDel
    {
        public bool IsDeleted { get; set; }
    }

    public interface IDel
    {
        bool IsDeleted { get; set; }
    }
}